﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace lcgps.Web
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void btn_login_Click(object sender, EventArgs e)
        {
            string name = this.txt_name.Text;
            string pass = this.txt_pass.Text;
            DataSet ds = new lcgps.BLL.user().GetList(" user_login='" + name + "' and user_pass='" + pass + "' ");

            if (ds.Tables[0].Rows.Count > 0)
            {
                int user_id = int.Parse(ds.Tables[0].Rows[0]["user_id"].ToString());
                Session["user"] = ds.Tables[0];//用户信息
                Response.Redirect("main.aspx");
            }
            else
            {
                Maticsoft.Common.MessageBox.Show(this, "用户名密码错误！");
            }
        }
    }
}